function muti(number) {
    return new Promise(resolve => {
        setTimeout(() => {
            resolve(number*number)
        },1000)
    })
}
let arr = [1, 2, 3]
// forEach 为同步循环
// arr.forEach( async itme => {
//     const a = await muti(itme)
//     console.log(a)
// })
!(async () => {
    for(item of arr) {
        let res = await muti(item)
        console.log(res)
    }
})()
